package com.api.core.domain.query;

import com.alibaba.fastjson2.JSONObject;
import com.api.common.utils.StringUtils;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Getter;
import lombok.Setter;

import java.util.List;

@Getter
@Setter
public class LineTreeQuery {
    private Long lineId;
    private JSONObject lineNameLocales;
    @JsonIgnore
    private String strLineNameLocales;
    private String type = "line";
    private List<RobotTreeQuery> children;
    public void setStrLineNameLocales(String strLineNameLocales){
        if(StringUtils.isNoneBlank(strLineNameLocales)){
            this.lineNameLocales = JSONObject.parseObject(strLineNameLocales);
        }
        this.strLineNameLocales = strLineNameLocales;
    }
}
